//
//  HistoryRoseController.m
//  FinancialProduct
//  历史净值
//  Created by Stella on 2017/9/8.
//  Copyright © 2017年 maq. All rights reserved.
//

#import "DBHelper.h"
#import "NetWorthCell.h"
#import "RoseModel.h"
#import "MJExtension.h"
#import "HistoryRoseController.h"

@interface HistoryRoseController ()
@property (weak, nonatomic) IBOutlet UIView *noDataView;

@end

@implementation HistoryRoseController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"历史净值";
    if (self.dataArray.count==0) {
        self.noDataView.hidden=NO;
    }else{
        self.noDataView.hidden=YES;
    }
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
 
    return 40;
    
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    
    return 1;
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return self.dataArray.count;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

        NetWorthCell *cell=[tableView dequeueReusableCellWithIdentifier:@"NetWorthCell" forIndexPath:indexPath];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
        cell.accessoryType=UITableViewCellAccessoryNone;

    NSDictionary *info=self.dataArray[indexPath.row];
    RoseModel *mode=[RoseModel mj_objectWithKeyValues:info];
    cell.roseMode=mode;
    
        return cell;
   
    
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

    return 0.01;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 0.01;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

}


@end
